<template>
  <div>
    <h2>MyMovie组件-----{{$route.params.id}}------{{id}}</h2>
    <!--声明式导航--> 
    <button @click="goback(-1)">往后退一步</button>
  </div>
</template>

<script>
export default {
    name:'MyMovie',
    props:['id'],
    methods:{
      goback(id){
        this.$router.go(id)
      }
    }

}
</script>

<style>

</style>